const obj = {
  'name': 'lynn'
};

const print = function(msg, flag) {
  console.log(`${msg} - ${this?.name} ${flag}`);
}

/**
 * I am - undefined !!!
   I am - lynn !!!
   I am - lynn !!!
 */
print('I am', '!!!');
print.call(obj, 'I am', '!!!');
print.apply(obj, ['I am', '!!!']);

const fn = print.bind(obj);
console.log(fn.name)
fn('I am', '!!!'); // I am - lynn !!!

const fn2 = print.bind(obj, 'I am');
fn2('!!!'); // I am - lynn !!!
